import request from "../utils/request";


export function getCart(params={}){
    return request({
        method:'GET',
        url:'/cart',
        params
        //data为请求体, //此为接口中需要的内容
    })
}


export function update(data){
    return request({
        method:'PUT',
        url:'/cart',
        data
    })
}

export function deleteCart(id){
    return request({
        method:'DELETE',
        url:`/cart/${id}`
    })
}

export function addCart(data){
    return request({
        method:'POST',
        url:'/cart',
        data
        //data为请求体, //此为接口中需要的内容
    })
}
